package leetcode.primary;

public class T136 {
    public int singleNumber(int[] nums) {
        int single = 0;
        for (int num : nums) {
            single ^= num;
        }
        return single;
    }

    public static void main(String[] args) {
        T136 t136 = new T136();
        System.out.println(t136.singleNumber(new int[]{4,1,2,1,2}));
    }
}
